Skip to content

Commit c7a3abe

Browse files
author
Daniel Haselhan
committed
Remove import jobs, add new ogr command to import from GDB
1 parent 9acc70d commit c7a3abe

11 files changed

+48
-865
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To report bugs/issues/features requests, please file an [issue](https://github.c
2424
- [Pipelines](./docs/pipelines.md)
2525
- [SchemaSpy - ALCS](https://bcgov.github.io/alcs/schemaspy/alcs/index.html)
2626
- [SchemaSpy - OATS](https://bcgov.github.io/alcs/schemaspy/oats/index.html)
27-
- [One time Jobs](./docs/jobs.md)
27+
- [Maintenance Jobs](./docs/jobs.md)
2828

2929
## Development Environment Setup
3030

docs/jobs.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1-
# Jobs in Openshift
1+
# Maintenance Jobs
22

3-
The main ALCS service has been programmed with several useful jobs. Jobs can be executed locally by checking the package json and running the relevant commands.
3+
## PMBC Import
44

5-
## Openshift
5+
We receive the parcel data in a GDB from PMBC, this data changes and needs to be imported once a year.
6+
7+
1. Grab the new PMBC export in GDB and download to local machine
8+
1. Setup Portforwading as necessary to get access to Postgres
9+
1. Truncate the existing parcel_lookup table
10+
1. Run the following command replacing username and password as
11+
necessary: `ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=app user=postgres password=postgres active_schema=alcs" PMBC_export.gdb -nln parcel_lookup`
12+
1. Be patient, this will import ~2 million rows and will take ~10 minutes
13+
14+
## Running Jobs in Openshift
15+
16+
The main ALCS service has been programmed with several useful jobs. Jobs can be executed locally by checking the package
17+
json and running the relevant commands.
18+
19+
### Openshift
20+
21+
Using the template below these jobs can be executed inside openshift. Once logged into OpenShift go to the Jobs tab and
22+
Click new Job. Paste the below yml and update the following pieces:
623

7-
Using the template below these jobs can be executed inside openshift. Once logged into OpenShift go to the Jobs tab and Click new Job. Paste the below yml and update the following pieces:
824
* Replace the JOB_NAME with the jobs name
925
* Replace NAMESPACE with the project where you want to run the job
1026
* Replace VERSION_HERE with the version of the image to use
1127
* Replace COMMAND_HERE with the command to execute such as import
1228

13-
## Template
29+
### Template
30+
1431
```
1532
apiVersion: batch/v1
1633
kind: Job

services/apps/alcs/src/alcs/alcs.module.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import { CodeModule } from './code/code.module';
1111
import { CommentModule } from './comment/comment.module';
1212
import { CommissionerModule } from './commissioner/commissioner.module';
1313
import { HomeModule } from './home/home.module';
14-
import { ImportModule } from './import/import.module';
1514
import { InquiryModule } from './inquiry/inquiry.module';
1615
import { LocalGovernmentModule } from './local-government/local-government.module';
17-
import { MessageModule } from './message/message.module';
16+
import { MaintenanceModule } from './maintenance/maintenance.module';
1817
import { MeetingModule } from './meetings/meeting.module';
18+
import { MessageModule } from './message/message.module';
1919
import { NoticeOfIntentDecisionModule } from './notice-of-intent-decision/notice-of-intent-decision.module';
2020
import { NoticeOfIntentSubmissionStatusModule } from './notice-of-intent/notice-of-intent-submission-status/notice-of-intent-submission-status.module';
2121
import { NoticeOfIntentTimelineModule } from './notice-of-intent/notice-of-intent-timeline/notice-of-intent-timeline.module';
@@ -28,11 +28,9 @@ import { PlanningReviewTimelineModule } from './planning-review/planning-review-
2828
import { PlanningReviewModule } from './planning-review/planning-review.module';
2929
import { SearchModule } from './search/search.module';
3030
import { StaffJournalModule } from './staff-journal/staff-journal.module';
31-
import { MaintenanceModule } from './maintenance/maintenance.module';
3231

3332
@Module({
3433
imports: [
35-
ImportModule,
3634
ApplicationModule,
3735
CommentModule,
3836
MessageModule,

services/apps/alcs/src/alcs/import/application-import.service.spec.ts

-168
This file was deleted.

0 commit comments

Comments
 (0)