Skip to content

Commit

Permalink
kingfisher-collect(incremental): Avoid shfmt warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed May 1, 2024
1 parent 5ad645e commit 1b07605
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions salt/kingfisher/collect/files/bi/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env SENTRY_DSN={{ SENTRY_DSN }} .ve/bin/scrapy crawl \
--logfile="{{ userdir }}/logs/{{ crawl.spider }}-$(date +%F).log"

# shellcheck disable=all
{%- if crawl.get('powerbi') %}
{%- if crawl.powerbi %}
psql -U kingfisher_collect -h localhost -t -c 'SELECT data FROM {{ crawl.spider }}' -o {{ scratchdir }}/{{ crawl.spider }}.jsonl

ocdscardinal prepare \
Expand All @@ -27,11 +27,11 @@ ocdscardinal indicators \
--count \
--map \
{{ scratchdir }}/{{ crawl.spider }}.out.jsonl \
> {{ scratchdir }}/{{ crawl.spider }}.json
> {{scratchdir}}/{{crawl.spider}}.json

{{ userdir }}/bin/manage.py json-to-csv {{ scratchdir }}/{{ crawl.spider }}.json {{ scratchdir }}/{{ crawl.spider }}.csv

psql postgresql://kingfisher_collect@localhost:5432/kingfisher_collect \
-c "\copy {{ crawl.spider }}_result (ocid, subject, code, result, buyer_id, procuring_entity_id, tenderer_id, created_at) FROM stdin DELIMITER ',' CSV HEADER" \
< {{ scratchdir }}/{{ crawl.spider }}.csv
< {{scratchdir}}/{{crawl.spider}}.csv
{%- endif %}
2 changes: 1 addition & 1 deletion salt/kingfisher/collect/incremental.sls
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ cardinal:
{{ userdir }}/bin/manage.py:
file.managed:
- source: https://raw.githubusercontent.com/open-contracting/cardinal-rs/main/manage.py
- source_hash: 0135cf408ec098c9edf8748c02912d2285722a8ba5cd9cf371405604fee809c1
- source_hash: 8d6241ec40bd4dc798d340c0fddf5abbf7358ca232a809efd0a14c4c028ac85d
- makedirs: True
- mode: 755
- user: {{ entry.user }}
Expand Down

0 comments on commit 1b07605

Please sign in to comment.