Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
tomo-plugin-solid_queue
Advanced tools
This is a tomo plugin that provides tasks for managing solid_queue via systemd, based on the recommendations in the solid_queue documentation. This plugin assumes that you are also using the tomo rbenv
and env
plugins, and that you are using a systemd-based Linux distribution like Ubuntu 18 LTS.
This plugin requires solid_queue 0.6.0 or newer.
Run:
$ gem install tomo-plugin-solid_queue
Or add it to your Gemfile:
gem "tomo-plugin-solid_queue"
Then add the following to .tomo/config.rb
:
plugin "solid_queue"
setup do
# ...
run "solid_queue:setup_systemd"
end
deploy do
# ...
# Place this task at *after* core:symlink_current
run "solid_queue:restart"
end
This plugin installs solid_queue as a user-level service using systemctl --user
. This allows solid_queue to be installed, started, stopped, and restarted without a root user or sudo. However, when provisioning the host you must make sure to run the following command as root to allow the solid_queue process to continue running even after the tomo deploy user disconnects:
# run as root
$ loginctl enable-linger <DEPLOY_USER>
Name | Purpose |
---|---|
solid_queue_systemd_service | Name of the systemd unit that will be used to manage solid_queue Default: "solid_queue_%{application}.service" |
solid_queue_systemd_service_path | Location where the systemd unit will be installed Default: ".config/systemd/user/%{solid_queue_systemd_service}" |
solid_queue_systemd_service_template_path | Local path to the ERB template that will be used to create the systemd unit Default: service.erb |
Configures systemd to manage solid_queue. This means that solid_queue will automatically be restarted if it crashes, or if the host is rebooted. This task essentially does two things:
solid_queue.service
systemd unitsystemctl --user enable
Note that these units will be installed and run for the deploy user. You can use :solid_queue_systemd_service_template_path
to provide your own template and customize how solid_queue and systemd are configured.
solid_queue:setup_systemd
is intended for use as a setup task. It must be run before solid_queue can be started during a deploy.
Gracefully restarts the solid_queue service via systemd, or starts it if it isn't running already. Equivalent to:
systemctl --user restart solid_queue.service
Starts the solid_queue service via systemd, if it isn't running already. Equivalent to:
systemctl --user start solid_queue.service
Stops the solid_queue service via systemd. Equivalent to:
systemctl --user stop solid_queue.service
Prints the status of the solid_queue systemd service. Equivalent to:
systemctl --user status solid_queue.service
Uses journalctl
(part of systemd) to view the log output of the solid_queue service. This task is intended for use as a run task and accepts command-line arguments. The arguments are passed through to the journalctl
command. For example:
$ tomo run -- solid_queue:log -f
Will run this remote script:
journalctl -q --user-unit=solid_queue.service -f
Add a config/solid_queue.yml
file to your application (i.e. checked into git) and use that to configure solid_queue, using environment variables as necessary. For examples see https://github.com/rails/solid_queue?tab=readme-ov-file#configuration.
If you want to report a bug, or have ideas, feedback or questions about the gem, let me know via GitHub issues and I will do my best to provide a helpful answer. Happy hacking!
The gem is available as open source under the terms of the MIT License.
Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Pull requests are welcome!
FAQs
Unknown package
We found that tomo-plugin-solid_queue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.