{"id":19944307,"url":"https://github.com/taskforcesh/taskforce-connector","last_synced_at":"2025-04-04T19:06:54.029Z","repository":{"id":27336259,"uuid":"100105468","full_name":"taskforcesh/taskforce-connector","owner":"taskforcesh","description":"Service to allow local queues to be managed in taskforce.sh","archived":false,"fork":false,"pushed_at":"2025-01-16T22:32:02.000Z","size":1041,"stargazers_count":40,"open_issues_count":15,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T18:13:47.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taskforcesh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-12T10:32:00.000Z","updated_at":"2025-02-25T08:25:27.000Z","dependencies_parsed_at":"2022-07-27T09:32:03.574Z","dependency_job_id":"449d4c50-89de-46c1-984e-b8c5319352be","html_url":"https://github.com/taskforcesh/taskforce-connector","commit_stats":{"total_commits":135,"total_committers":7,"mean_commits":"19.285714285714285","dds":"0.22962962962962963","last_synced_commit":"806f0d62908509fe10e229458476587ad3ca1e81"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Ftaskforce-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Ftaskforce-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Ftaskforce-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Ftaskforce-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskforcesh","download_url":"https://codeload.github.com/taskforcesh/taskforce-connector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234921,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T00:19:54.005Z","updated_at":"2025-04-04T19:06:53.988Z","avatar_url":"https://github.com/taskforcesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taskforce Connector\n\nThis small service allows you to connect queues to [Taskforce](https://taskforce.sh) acting as a proxy between your queues and the UI. It is useful for connecting local development queues as well as production grade queues without the need of sharing passwords or establishing SSH tunnels.\n\nCurrently the connector supports [Bull](https://github.com/optimalbits/bull) and [BullMQ](https://github.com/taskforcesh/bullmq) queues.\n\nThe connector is designed to be lightweight and using a minimal set of resources from the local queues.\n\n## Install\n\nUsing [yarn](https://yarnpkg.com)\n\n```bash\nyarn global add taskforce-connector\n\n```\n\nUsing npm:\n\n```bash\nnpm install -g taskforce-connector\n```\n\n## Usage\n\nCall the tool and get a help on the options:\n\n```bash\n✗ taskforce --help\n\n  Usage: taskforce [options]\n\n\n  Options:\n\n    -V, --version               output the version number\n    -n, --name [name]           connection name [My Connection] (default: \"My Connection\")\n    -t, --token [token]         api token (get yours at https://taskforce.sh)\n    -p, --port [port]           redis port [6379] (default: \"6379\")\n    --tls [tls]                 (default: \"Activate secured TLS connection to Redis\")\n    -h, --host [host]           redis host [localhost] (default: \"localhost\")\n    -d, --database [db]         redis database [0] (default: \"0\")\n    --username [username]       redis username\n    --passwd [passwd]           redis password\n    --spasswd [spasswd]         redis sentinel password\n    -u, --uri [uri]             redis uri\n    --team [team]               specify team where to put the connection\n    -b, --backend [host]        backend domain [api.taskforce.sh] (default: \"wss://api.taskforce.sh\")\n    -s, --sentinels [host:port] comma-separated list of sentinel host/port pairs\n    -m, --master [name]         name of master node used in sentinel configuration\n    -h, --help                  output usage information\n    --nodes [nodes]             comma-separated list of cluster nodes uris to connect to (Redis Cluster)\n    --queues \u003cqueues\u003e           optional comma-separated list of queues to monitor\n    --queuesFile \u003cqueuesFile\u003e   optional file with queues to monitor\n```\n\nExample:\n\n```bash\n✗ taskforce -n \"transcoder connection\" -t 2cfe6a1b-5f0e-466f-99ad-12f51bea79a7\n```\n\nThe token `2cfe6a1b-5f0e-466f-99ad-12f51bea79a7` is a private token that can be retrieved at your [Taskforce account](https://taskforce.sh/account).\n\nAfter running the command, you should be able to see the connection appear automatically on the dashboard.\n\nSentinel Example:\n\n```bash\n✗ taskforce -n \"transcoder connection\" -t 2cfe6a1b-5f0e-466f-99ad-12f51bea79a7 -s sentinel1.mydomain:6379,sentinel2.mydomain:6379 -m mymaster\n```\n\nNote: You can also specify the following with environment variables.\n\n```bash\ntoken                 TASKFORCE_TOKEN\nport                  REDIS_PORT\nhost                  REDIS_HOST\npassword              REDIS_PASSWD\nsentinel-password     REDIS_SENTINEL_PASSWD\nuri                   REDIS_URI\nsentinels             REDIS_SENTINELS (comma separated list of sentinels)\nmaster                REDIS_MASTER\nnodes                 REDIS_NODES (comma separated list of nodes for Redis Cluster)\n```\n\nTo enable use if TLS when using the container set this environment variable:\n```bash\nREDIS_USE_TLS=1\n```\n\nNote for Redis Cluster: You may also need to specify following with environment variables.\n```bash\nCluster TLS Certificate      REDIS_CLUSTER_TLS\n```\n\nIf your redis cluster still cannot connect due to failing certificate validation, you may need to pass this env to skip cert validation.\n```bash\nNODE_TLS_REJECT_UNAUTHORIZED=\"0\"\n```\n\n## Secured TLS Connections\n\nServices that support TLS can also be used using the connector, use the `--tls` flag. Note that some services such as Heroku expects the port number to be \"one more\" than the normal unencrypted port [read more](https://devcenter.heroku.com/articles/securing-heroku-redis).\n\n## Teams\n\nYou can use the connector to spawn queue connections to any team that you created on your organization, just pass the team name\nas an option:\n\n```bash\n✗ taskforce -n \"transcoder connection\" -t 2cfe6a1b-5f0e-466f-99ad-12f51bea79a7 --team \"my awesome team\"\n\n```\n\n## Use as a library\n\nIt is also possible to add the connector as a library:\n\nAs a commonjs dependency:\n\n```js\nconst { Connect } = require(\"taskforce-connector\");\n\nconst taskforceConnection = Connect(\"my connection\", \"my token\", {\n  host: \"my redis host\",\n  port: \"my redis port\",\n  password: \"my redis password\",\n});\n```\n\nor as a es6 module:\n\n```ts\nimport { Connect } from \"taskforce-connector\";\n\nconst taskforceConnection = Connect(\"my connection\", \"my token\", {\n  host: \"my redis host\",\n  port: \"my redis port\",\n  password: \"my redis password\",\n});\n```\n\nIf you are using the On Premises version of Taskforce, you can also specify the backend domain:\n\n```ts\nconst taskforceConnection = Connect(\n  \"my connection\",\n  \"my token\",\n  {\n    host: \"my redis host\",\n    port: \"my redis port\",\n    password: \"my redis password\",\n  },\n  \"My Prod Team\", // optional team name\n  \"wss://mybackend.domain\"\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskforcesh%2Ftaskforce-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskforcesh%2Ftaskforce-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskforcesh%2Ftaskforce-connector/lists"}