[freshports-coders] fp-listen

Dan Langille dan at langille.org
Wed Aug 9 11:45:39 UTC 2023


> On Aug 8, 2023, at 8:08 PM, Jesse Smith <jessefrgsmith at yahoo.ca> wrote:
> 
> I completed the task laid out below today. My steps were as follows:
> 
> 1. Changed into the /usr/local/etc/freshports directory to confirm the
> files I wanted were there and I could read them.
> 
> 2. Made a backup copy of the current fp-listen.ini file, copying it my
> home directory. Just in case I messed up the process.

Good idea. Afterwards, please delete as it contains secrets. :)

> 3. Opened the fp-listen.ini file in one terminal in vi and
> fp-listen.ini.sample file in a second terminal so I could compare them
> side-by-side. The files are quite small, only a dozen lines or so, and I
> figured it would be straight forward to compare them "by hand".

I do the same thing. I appreciate that you 

> 
> 4. Identified the two new configuration files in the .sample file,
> SANITY_CACHE_PATH and SANITY_MAIN_CACHE_PATH, and copied them to the
> fp-listen.ini file.

Those relate to two new cache clearing locations: https://github.com/FreshPorts/freshports/issues/451

> 5. Confirmed the paths these variables point to exist on the server (ie
> I do not need to create the directory path manually).

Quite thorough.

> 6. Opened the freshports log file for monitoring in one terminal.
> Restarted the fp_listen service in the other terminal. Confirmed the
> expected  "Starting up" message was displayed.

that's /var/log/freshports/freshports.log

> 
> 7. Confirmed website is visible to users (ie nothing super bad went wrong).

Thank you.

> 
> 
> I think that covers everything.

I think so too. Thank you.

> 
> 
> On 2023-08-07 6:50 p.m., Dan Langille wrote:
>> The fp-listen daemon runs on the webserver node. It connects to the database and waits for signals. The signal wakes it up. Based on the signal, it takes an action, which might include reading a database table for a list of things to clear.
>> 
>> That list of things to clear has been enlarged.
>> 
>> fp-listen needs to know where to find the new things to clear from the cache. Cache is stored on disk. The fp-listen.ini.sample file has three new items. 
>> 
>> In short, fp-listen.ini needs to be updated based on what's in fp-listen.ini.sample
>> 
>> Look in /usr/local/etc/freshports/ for both files, update, and restart:
>> 
>> service fp_listen restart
>> 
>> and tail -F /var/log/freshports/freshports.log
>> 
>> It should start up like this:
>> 
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: Starting up - this should not occur often
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: These are the (event name, script name) pairs we are ready for:
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('port_updated', 'listen_port')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('ports_moved', 'listen_ports_moved')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('ports_updating', 'listen_ports_updating')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('vuxml', 'listen_vuxml')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('category_new', 'listen_category_new')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('date_updated', 'listen_date_updated')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('packages_imported', 'listen_packages_imported')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('listen_for', 'ClearPackagesCache')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('commit_updated', 'listen_commit')
>> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: Just woke up! *************
>> 
>> Please post your work.  I know posting your work wasn't mentioned before you joined up. I think it would be useful for others to see.
>> 
>> Thank you.
>> 
> 
> _______________________________________________
> freshports-coders mailing list
> freshports-coders at lists.freshports.org
> https://lists.freshports.org/mailman/listinfo/freshports-coders

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freshports.org/pipermail/freshports-coders/attachments/20230809/df4b1f30/attachment-0001.htm>


More information about the freshports-coders mailing list