diff --git a/crawlers/deploy/deploy.bash b/crawlers/deploy/deploy.bash index b98538d5..fab521a6 100755 --- a/crawlers/deploy/deploy.bash +++ b/crawlers/deploy/deploy.bash @@ -35,6 +35,8 @@ ETHEREUM_TXPOOL_SERVICE_FILE="ethereum-txpool.service" ETHEREUM_MISSING_SERVICE_FILE="ethereum-missing.service" ETHEREUM_MISSING_TIMER_FILE="ethereum-missing.timer" ETHEREUM_MOONWORM_CRAWLER_SERVICE_FILE="ethereum-moonworm-crawler.service" +ETHEREUM_ORANGE_DAO_REPORTS_TOKENONOMICS_SERVICE_FILE="ethereum-orange-dao-reports-tokenonomics.service" +ETHEREUM_ORANGE_DAO_TOKENONOMICS_TIMER_FILE="ethereum-orange-dao-reports-tokenonomics.timer" # Polygon service files POLYGON_SYNCHRONIZE_SERVICE="polygon-synchronize.service" @@ -170,6 +172,16 @@ cp "${SCRIPT_DIR}/${ETHEREUM_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.conf XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ETHEREUM_MOONWORM_CRAWLER_SERVICE_FILE}" +echo +echo +echo -e "${PREFIX_INFO} Replacing existing Ethereum Orange DAO reports tokenonomics service and timer with: ${ETHEREUM_ORANGE_DAO_REPORTS_TOKENONOMICS_SERVICE_FILE}, ${ETHEREUM_ORANGE_DAO_TOKENONOMICS_TIMER_FILE}" +chmod 644 "${SCRIPT_DIR}/${ETHEREUM_ORANGE_DAO_REPORTS_TOKENONOMICS_SERVICE_FILE}" "${SCRIPT_DIR}/${ETHEREUM_ORANGE_DAO_TOKENONOMICS_TIMER_FILE}" +cp "${SCRIPT_DIR}/${ETHEREUM_ORANGE_DAO_REPORTS_TOKENONOMICS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ETHEREUM_ORANGE_DAO_REPORTS_TOKENONOMICS_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${ETHEREUM_ORANGE_DAO_TOKENONOMICS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ETHEREUM_ORANGE_DAO_TOKENONOMICS_TIMER_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ETHEREUM_ORANGE_DAO_TOKENONOMICS_TIMER_FILE}" + + echo echo echo -e "${PREFIX_INFO} Replacing existing Polygon block with transactions syncronizer service definition with ${POLYGON_SYNCHRONIZE_SERVICE}" diff --git a/crawlers/deploy/ethereum-orange-dao-reports-tokenonomics.service b/crawlers/deploy/ethereum-orange-dao-reports-tokenonomics.service new file mode 100644 index 00000000..36ee7f1b --- /dev/null +++ b/crawlers/deploy/ethereum-orange-dao-reports-tokenonomics.service @@ -0,0 +1,11 @@ +[Unit] +Description=Runs custom crawler for orange dao tokenonomics +After=network.target + +[Service] +Type=oneshot +WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl +EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env +ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.reports_crawler.cli orangedao --moonstream-token {$ORANGE_DAO_QUERIES_TOKEN} run_tokenomics_orange_dao +CPUWeight=60 +SyslogIdentifier=polygon-orange-dao-reports-tokenonomics \ No newline at end of file diff --git a/crawlers/deploy/ethereum-orange-dao-reports-tokenonomics.timer b/crawlers/deploy/ethereum-orange-dao-reports-tokenonomics.timer new file mode 100644 index 00000000..23a375ba --- /dev/null +++ b/crawlers/deploy/ethereum-orange-dao-reports-tokenonomics.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Runs custom crawler for CU tokenonomics + +[Timer] +OnBootSec=60s +OnUnitActiveSec=10m + +[Install] +WantedBy=timers.target diff --git a/crawlers/deploy/polygon-cu-reports-tokenonomics.service b/crawlers/deploy/polygon-cu-reports-tokenonomics.service index 8f2b1926..dededd71 100644 --- a/crawlers/deploy/polygon-cu-reports-tokenonomics.service +++ b/crawlers/deploy/polygon-cu-reports-tokenonomics.service @@ -6,6 +6,6 @@ After=network.target Type=oneshot WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env -ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.cu_reports_crawler.cli cu-reports --moonstream-token "${MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN}" queries run-tokenonomics +ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.reports_crawler.cli cu-reports --moonstream-token "${MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN}" queries run-tokenonomics CPUWeight=60 SyslogIdentifier=polygon-cu-reports-tokenonomics \ No newline at end of file