A Labtasker plugin that groups tasks according to recency.
Project description
labtasker-plugin-task-recency
A Labtasker plugin for retrieving tasks grouped by time chunks.
Overview
This plugin extends Labtasker's functionality by allowing you to retrieve tasks that occurred within specific time chunks. It groups tasks based on time intervals between consecutive tasks, making it easy to analyze and process tasks that were submitted in bursts.
Installation
pip install labtasker-plugin-task-recency
Usage
labtasker task recent [OPTIONS]
Options
| Option | Default | Description |
|---|---|---|
--by |
created_at |
The timestamp field to group tasks by. Options: created_at, start_time, last_heartbeat, last_modified |
--interval, -i |
5s |
Time interval to define chunks. Accepts duration strings like 1h, 1h30m, 50s |
--k, -k |
1 |
Which chunk to retrieve (1 is most recent, 2 is second most recent, etc.) |
--order |
desc |
Sort order within each chunk. Options: desc (newest first), asc (oldest first) |
Examples
-
Get the most recent batch of tasks (tasks submitted with less than 5 seconds between them):
labtasker task recent
-
Get the second most recent batch of tasks:
labtasker task recent --k 2
-
Get tasks grouped by a 1-hour interval:
labtasker task recent --interval 1h
-
Get tasks grouped by their start time instead of creation time:
labtasker task recent --by start_time
-
Get the oldest batch of tasks:
labtasker task recent --k 1 --order asc
How It Works
The plugin groups tasks into "chunks" based on the time gaps between consecutive tasks. If two tasks are submitted with a gap smaller than the specified interval, they belong to the same chunk. When the time gap exceeds the interval, a new chunk begins.
This approach is useful for identifying batches of tasks that were submitted together, allowing for easier management and analysis of task patterns.
Use Cases
- Batch delete / update of most recently submitted tasks
labtasker task recent | labtasker task delete -y
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labtasker_plugin_task_recency-0.1.0.tar.gz.
File metadata
- Download URL: labtasker_plugin_task_recency-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
481cb8318dd43787ee8291a8e495c30231afba98317c45c0ca3c46b323632c3e
|
|
| MD5 |
75ee533a980eb3970b335b1f25196630
|
|
| BLAKE2b-256 |
b60403dc2d4fbe2c3ea5612c0c266a4b6e5fb62c91991251128d0e5883cf6e80
|
Provenance
The following attestation bundles were made for labtasker_plugin_task_recency-0.1.0.tar.gz:
Publisher:
release.yml on luocfprime/labtasker-plugin-task-recency
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labtasker_plugin_task_recency-0.1.0.tar.gz -
Subject digest:
481cb8318dd43787ee8291a8e495c30231afba98317c45c0ca3c46b323632c3e - Sigstore transparency entry: 320386468
- Sigstore integration time:
-
Permalink:
luocfprime/labtasker-plugin-task-recency@42a23bcb81f47d7115a377888ad0834b50f9d5a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/luocfprime
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@42a23bcb81f47d7115a377888ad0834b50f9d5a5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file labtasker_plugin_task_recency-0.1.0-py3-none-any.whl.
File metadata
- Download URL: labtasker_plugin_task_recency-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
284000044c6e2276ac92bfecf060f51ec447054a871e76b8f8d7e6143b81a43a
|
|
| MD5 |
ea39f0d4f9d738c11e30b91b2264c6a8
|
|
| BLAKE2b-256 |
c058fc21a31230bf5086125b176d68249306756375f4fb482fc98f8c52d99e3f
|
Provenance
The following attestation bundles were made for labtasker_plugin_task_recency-0.1.0-py3-none-any.whl:
Publisher:
release.yml on luocfprime/labtasker-plugin-task-recency
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labtasker_plugin_task_recency-0.1.0-py3-none-any.whl -
Subject digest:
284000044c6e2276ac92bfecf060f51ec447054a871e76b8f8d7e6143b81a43a - Sigstore transparency entry: 320386474
- Sigstore integration time:
-
Permalink:
luocfprime/labtasker-plugin-task-recency@42a23bcb81f47d7115a377888ad0834b50f9d5a5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/luocfprime
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@42a23bcb81f47d7115a377888ad0834b50f9d5a5 -
Trigger Event:
release
-
Statement type: