#!/bin/nu
open testdata.txt | grep Task | lines | parse -r 'celery_worker-(?<workerid>\d+?)\s+\|\s+\[(?<date>.*?) (?<time>.*?): (?<tag>.*?)\] Task (?<taskname>.*?)\[(?<taskid>.*?)\] (?<msg>.*?)\z' | insert msgtime {|row| $row.msg | parse -r '[a-zA-Z ]+(?<t>[\d.]*)s.*' | get -i 0.t} | update msg {|row| $row.msg | split words | get 0}
