Taskforce connector
Last updated
Last updated
The taskforce connector is a small command line tool that is used for connecting securely a redis instance to taskforce.sh. The connector opens a websocket connection (TLS encrypted) on some instance close to your redis connection, can be inside a secured VPC without any public access, as long as the instance running itself has access to the internet.
The connector is particularly useful if you want to connect redis instances running on your localhost.
You can easily test the connector locally before using it in a more sophisticated production environment. You will need a running local redis instance for the following instructions to work.
Start by installing the connector globally:
In order to use the connector you will need an API token, you can find the one belonging to your account in the Account view in taskforce.sh:
Using this token you can now call the connector to establish the connection to taskforce.sh:
The connection will appear automatically in the left sidebar, and you will have access to all the queues in that redis instance:
The connector has several other settings, for instance you can specify connection details for your redis instance:
you need to have enough connections quota in taskforce.sh for the connector to work.
We also provide a minimal docker container that can be conveniently deployed in your infrastructure. All required settings are exposed as environment variables, see this docker-compose.yaml
file as an example on how to run the connector and a redis instance connected to it:
The taskforce connector also allows you to specify a team, as in the yaml above or using the command line. For the following to work you need to create a Team in taskforce.sh first.
You can find the lates up-to-date instructions on how to use the connector here: https://github.com/taskforcesh/taskforce-connector
You can find the lates up-to-date instructions on how to use the connector here: https://github.com/taskforcesh/taskforce-connector
By default, the connector will issue a scan to find the queues that are present in the given Redis instance. This scan filters the keys by key type (only string keys are considered), and that match a given pattern (prefix:queue-name:id
). This method is automatic and works most of the time, completely transparent to the user. Depending on the Redis instance, or if the amount of keys in the instance is very large, the time to do the queue discovery can be too long. There is a maximum timeout of 40 seconds, after that, the connector will not continue trying to find more queues in the instance.
It is possible to manually specify the queues that we want to give access to Taskforce.sh. This is useful in order to avoid a possible slow queue discovery, or to protect queues that should not be accessible by all the members of a given team. Notice that you could have different connectors for the same Redis instance for different teams.
You can specify the queues either in the command line or in a separate text file. In the command line separate every queue name with commas (do not add any spaces between queue names):
If your queues are not using the standard queue prefix "bull", you can specify a different prefix as well:
If your queue names include non-ASCII characters or spaces you can wrap the list in quotes:
If you prefer to specify the queue names in a separate file you can just add the queue names separated by newlines:
And specifying the filename with --queuesFile
: