[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #ZSB-314239]: generate unique files



Erik,

If the data-products arrive with identical WMO headers and creation-times
within the same second, then there's nothing that pqact(1) can do to
distinguish them.

If appending to the same file is unacceptable, then you should try PIPEing
(instead of FILEing) to a script that checks to see if the output file
already exists and adds a differentiating component (e.g., an index) to the
filename. Use the "-close" option so that this decoder is started each time.

> Hello - we have an application that intakes weather warnings, stores them
> to a database, and then it is viewable on our website.  The application
> requires that each warning is in it's own file.
> 
> To accomplish this '1 warning per file' the previous IT admin setup pqact
> entries such as the following:
> 
> Tornado warnings (TOR product)
> WMO ^(WF)(US|AK|GM|CA|PU|HW|PA)(..)(.)(K|P|T|N)(...)(.*) FILE -strip
> -overwrite /downloads/\1\2\3\5\6.%H%M%S-%m%d%Y
> This works 98% of the time, however the issue arises when a weather station
> issues a warning for multiple counties at the same time.  The regular
> expression gets matched twice.
> 
> Because of the overwrite switch, this is what happens I believe.
> 
> -the first match comes in, and saves appropriately, but the file stays open
> -the second match comes in, but because the target file from the first
> match is still open, it is bounced
> 
> So in short, here is my question: Is there a way we can save files with a
> unique identifier (such as the hash) so that each file saves uniquely?

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: ZSB-314239
Department: Support LDM
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.