<?xml version="1.0" encoding="utf-8" ?>

<?xml-stylesheet type="text/xsl" href="/templates/2k11/rss.xsl" media="screen" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" >
<channel>
    
    <title>artodeto's free port - coding</title>
    <link>https://artodeto.bazzline.net/</link>
    <description>A remote home for thoughts about coding, world and personal events</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.6.0 - http://www.s9y.org/</generator>
    <ttl>240</ttl>
<pubDate>Sat, 19 Apr 2025 09:36:00 GMT</pubDate>

    <image>
    <url>https://artodeto.bazzline.net/templates/2k11/img/s9y_banner_small.png</url>
    <title>RSS: artodeto's free port - coding - A remote home for thoughts about coding, world and personal events</title>
    <link>https://artodeto.bazzline.net/</link>
    <width>100</width>
    <height>21</height>
</image>

<item>
    <title>Simple shell script to update your rustdesk server running on your uberspace instance</title>
    <link>https://artodeto.bazzline.net/archives/23523-Simple-shell-script-to-update-your-rustdesk-server-running-on-your-uberspace-instance.html</link>
            <category>coding</category>
    
    <comments>https://artodeto.bazzline.net/archives/23523-Simple-shell-script-to-update-your-rustdesk-server-running-on-your-uberspace-instance.html#comments</comments>
    <wfw:comment>https://artodeto.bazzline.net/wfwcomment.php?cid=23523</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://artodeto.bazzline.net/rss.php?version=2.0&amp;type=comments&amp;cid=23523</wfw:commentRss>
    

    <author>nospam@example.com (artodeto)</author>
    <content:encoded>
    &lt;p&gt;Thanks to the wonderful &lt;a href=&quot;https://lab.uberspace.de/guide_rustdesk/&quot;&gt;rustdesk howto&lt;/a&gt;, I was able to quickly setup my own rustdesk instance.&lt;/p&gt;

&lt;p&gt;With this benefit, I know I have to maintain yet another software so I wrote a dead simple &quot;update_rustdesk.sh&quot; I want to share.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash
####
# @ref: https://lab.uberspace.de/guide_rustdesk/
# @since: 2025-04-19
# @author: stev leibelt &amp;lt;artodeto@bazzline.net&amp;gt;
####

function _main ()
{
    local CURRENT_WORKING_DIRECTORY
    local INSTALLED_VERSION
    local LOCAL_BASE_PATH
    local VERSION_TO_DOWNLOAD

    CURRENT_WORKING_DIRECTORY=$(pwd)
    # adapt this line
    LOCAL_BASE_PATH=&quot;${2:-/home/&amp;lt;string: your_user&amp;gt;/rustdesk}&quot;
    VERSION_TO_DOWNLOAD=&quot;${1}&quot;

    if [[ -z &quot;${VERSION_TO_DOWNLOAD}&quot; ]];
    then
        echo &quot;:: Usage&quot;
        echo &quot;   ${0} &amp;lt;string: latest_rustdesk_version&amp;gt; [&amp;lt;string: local_installed_path&amp;gt;&quot;
        echo &quot;&quot;

        return 0
    fi

    if [[ ! -d &quot;${LOCAL_BASE_PATH}&quot; ]];
    then
        echo &quot;:: Error&quot;
        echo &quot;   &amp;gt;&amp;gt;${LOCAL_BASE_PATH}&amp;lt;&amp;lt; is not a directory.&quot;
        echo &quot;&quot;

        return 10
    fi

    cd &quot;${LOCAL_BASE_PATH}&quot;

    if [[ ! -f &quot;.current_version&quot; ]];
    then
        echo &quot;:: Error&quot;
        echo &quot;   &amp;gt;&amp;gt;${LOCAL_BASE_PATH}/.current_version&amp;lt;&amp;lt; is not a file.&quot;
        echo &quot;&quot;
        cd &quot;${CURRENT_WORKING_DIRECTORY}&quot;

        return 15
    fi

    INSTALLED_VERSION=$(cat &quot;.current_version&quot;)

    if [[ &quot;${INSTALLED_VERSION}&quot; == &quot;${VERSION_TO_DOWNLOAD}&quot; ]];
    then
        echo &quot;:: Nothing to do&quot;
        echo &quot;   ${INSTALLED_VERSION} already installed.&quot;
        echo &quot;&quot;
        cd &quot;${CURRENT_WORKING_DIRECTORY}&quot;

        return 0
    fi

    if [[ -d &quot;new&quot; ]];
    then
        rm -fr &quot;new&quot;
    fi

    supervisorctl stop rustdesk_hbbr
    supervisorctl stop rustdesk_hbbs

    mkdir -p &quot;new&quot;
    cd new
    if wget &quot;https://github.com/rustdesk/rustdesk-server/releases/download/${VERSION_TO_DOWNLOAD}/rustdesk-server-linux-amd64.zip&quot;;
    then
        unzip -j rustdesk-server-linux-amd64.zip

        if [[ ! -f hbbr ]];
        then
            echo &quot;:: Error&quot;
            echo &quot;   &amp;gt;&amp;gt;${LOCAL_BASE_PATH}/new/hbbr is not a file.&quot;
            echo &quot;&quot;
            cd &quot;${CURRENT_WORKING_DIRECTORY}&quot;

            return 30
        fi

        if [[ ! -f hbbs ]];
        then
            echo &quot;:: Error&quot;
            echo &quot;   &amp;gt;&amp;gt;${LOCAL_BASE_PATH}/new/hbbs is not a file.&quot;
            echo &quot;&quot;
            cd &quot;${CURRENT_WORKING_DIRECTORY}&quot;

            return 32
        fi

        if [[ ! -f rustdesk-utils ]];
        then
            echo &quot;:: Error&quot;
            echo &quot;   &amp;gt;&amp;gt;${LOCAL_BASE_PATH}/new/rustdesk-utils is not a file.&quot;
            echo &quot;&quot;
            cd &quot;${CURRENT_WORKING_DIRECTORY}&quot;

            return 34
        fi

        mv ../hbbr ../hbbr.previous
        mv ../hbbs ../hbbs.previous
        mv ../rustdesk-utils ../rustdesk-utils.previous

        mv hbbr ../
        mv hbbs ../
        mv rustdesk-utils ../

        echo &quot;${VERSION_TO_DOWNLOAD}&quot; &amp;gt; ../.current_version

        supervisorctl start rustdesk_hbbs
        supervisorctl start rustdesk_hbbr

        echo &quot;   Switched from &amp;gt;&amp;gt;${INSTALLED_VERSION}&amp;lt;&amp;lt; to &amp;gt;&amp;gt;${VERSION_TO_DOWNLOAD}&amp;lt;&amp;lt;&quot;
    else
        echo &quot;:: Error&quot;
        echo &quot;   wget last exit code ${?}&quot;
        echo &quot;&quot;
        cd &quot;${CURRENT_WORKING_DIRECTORY}&quot;

        return 20
    fi
}

_main &quot;${@}&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You only have to adapt one line, all else should work out of the box.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 19 Apr 2025 11:36:00 +0200</pubDate>
    <guid isPermaLink="false">https://artodeto.bazzline.net/archives/23523-guid.html</guid>
    <category>bash english howto update</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Nextcloud polls is broken / no poll is loaded / nextcloud.log screams &gt;&gt;unknown config key&lt;&lt;</title>
    <link>https://artodeto.bazzline.net/archives/22635-Nextcloud-polls-is-broken-no-poll-is-loaded-nextcloud.log-screams-unknown-config-key.html</link>
            <category>coding</category>
    
    <comments>https://artodeto.bazzline.net/archives/22635-Nextcloud-polls-is-broken-no-poll-is-loaded-nextcloud.log-screams-unknown-config-key.html#comments</comments>
    <wfw:comment>https://artodeto.bazzline.net/wfwcomment.php?cid=22635</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://artodeto.bazzline.net/rss.php?version=2.0&amp;type=comments&amp;cid=22635</wfw:commentRss>
    

    <author>nospam@example.com (artodeto)</author>
    <content:encoded>
    &lt;p&gt;I am not an heavy user of the nextcloud &lt;a href=&quot;https://github.com/nextcloud/polls&quot;&gt;polls&lt;/a&gt; application, so this issue could be an oldie but goldie.&lt;/p&gt;

&lt;p&gt;I am working on a &lt;a href=&quot;https://github.com/nextcloud/server/tree/v30.0.5&quot;&gt;nextcloud&lt;/a&gt; version &lt;code&gt;30.0.5.1&lt;/code&gt; and I wanted to create a poll.&lt;/p&gt;

&lt;p&gt;First discovery, all polls are gone and I was not able to configure anything Preference section. A &lt;code&gt;tail&lt;/code&gt; on the &lt;code&gt;nextcloud.log&lt;/code&gt; told me that &lt;code&gt;apps/polls/lib/Controller/PollController.php&lt;/code&gt; is producing a &lt;code&gt;unknown config key&lt;/code&gt; log entry.&lt;/p&gt;

&lt;p&gt;Long story short, this &lt;a href=&quot;https://help.nextcloud.com/t/polls-version-8-0-0-alpha8/206973/3&quot;&gt;link&lt;/a&gt; from the closed &lt;a href=&quot;https://github.com/nextcloud/polls/issues/3806&quot;&gt;issue/3806&lt;/a&gt; pointed me to the right direct.&lt;br /&gt;
Logged in as admin, I&#039;ve opened the &lt;code&gt;settings/admin/polls&lt;/code&gt; and disabled and enabled the &lt;code&gt;Enable the poll creation globally&lt;/code&gt; option. After that and a page reload as a user, almost all is working fine. There is only one open issue with the &quot;copy link to clipboard&quot; option :-&amp;#46;&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 17 Jan 2025 16:52:00 +0100</pubDate>
    <guid isPermaLink="false">https://artodeto.bazzline.net/archives/22635-guid.html</guid>
    <category>english</category>
<category>error solving</category>
<category>howto</category>
<category>nextcloud</category>
<category>php</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Solved my dramatiq puzzle, two times!</title>
    <link>https://artodeto.bazzline.net/archives/22478-Solved-my-dramatiq-puzzle,-two-times!.html</link>
            <category>coding</category>
    
    <comments>https://artodeto.bazzline.net/archives/22478-Solved-my-dramatiq-puzzle,-two-times!.html#comments</comments>
    <wfw:comment>https://artodeto.bazzline.net/wfwcomment.php?cid=22478</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://artodeto.bazzline.net/rss.php?version=2.0&amp;type=comments&amp;cid=22478</wfw:commentRss>
    

    <author>nospam@example.com (artodeto)</author>
    <content:encoded>
    &lt;p&gt;It took me some time and a &lt;a href=&quot;https://groups.io/g/dramatiq-users/message/291&quot;&gt;push into the right direction&lt;/a&gt; to solve &lt;a href=&quot;archives/22476-Lets-write-a-cli-application-in-python-using-dramatiq-and-spend-a-week-chasing-issues.html&quot;&gt;my puzzle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My first solution is a fix for my &lt;a href=&quot;https://github.com/stevleibelt/typer-dramatiq-example/commit/a9e88b14ad4168524f587d22df8c0fe1b480b541&quot;&gt;all actors in one worker&lt;/a&gt;.
The fix here was to remove the dramatiq setup call from within each actor and to centralize it in the one worker file before importing the actors per context.&lt;/p&gt;

&lt;p&gt;My second solution is a fix for my &lt;a href=&quot;https://github.com/stevleibelt/typer-dramatiq-example/commit/b56ad45f4b46181abb64a0f5ba6d4533a9fddbcd&quot;&gt;one worker per context&lt;/a&gt;.
The fix here was to add a state to the dramatiq setup to prevent creating brokers instances after broker instances.&lt;/p&gt;

&lt;p&gt;With my code, you are now able to create python project that uses dramatiq and has multiple actors defined in multiple worker files.&lt;/p&gt;

&lt;p&gt;Sounds simple but took me more than an week. Hope it prevents at least one to waste that time!&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sun, 29 Sep 2024 22:33:00 +0200</pubDate>
    <guid isPermaLink="false">https://artodeto.bazzline.net/archives/22478-guid.html</guid>
    <category>cli</category>
<category>dramatiq</category>
<category>english</category>
<category>fix</category>
<category>python</category>
<category>typer</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>Lets write a cli application in python using dramatiq and spend a week chasing issues</title>
    <link>https://artodeto.bazzline.net/archives/22476-Lets-write-a-cli-application-in-python-using-dramatiq-and-spend-a-week-chasing-issues.html</link>
            <category>coding</category>
    
    <comments>https://artodeto.bazzline.net/archives/22476-Lets-write-a-cli-application-in-python-using-dramatiq-and-spend-a-week-chasing-issues.html#comments</comments>
    <wfw:comment>https://artodeto.bazzline.net/wfwcomment.php?cid=22476</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://artodeto.bazzline.net/rss.php?version=2.0&amp;type=comments&amp;cid=22476</wfw:commentRss>
    

    <author>nospam@example.com (artodeto)</author>
    <content:encoded>
    &lt;p&gt;I am currently developing a cli application using &lt;a href=&quot;https://typer.tiangolo.com/tutorial/typer-command/&quot;&gt;typer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As far as possible, I try to have strict separated bounded context. I ended up build two problems I need to solve. One problem was to create a adapter to enable each context to exchange well defined messages or data with another context. The second issue was a pure scale issue. There are moments were part of the application just iterates over an result set of gazillion (or &quot;millausend&quot; as the German&#039;s are saying) entries. The runtime was ramping minutes and this sucks.&lt;/p&gt;

&lt;p&gt;I ended up evaluating task queue libraries in python. Based on my gut-feeling, I wanted to avoid &lt;a href=&quot;https://docs.celeryq.dev/en/stable/index.html&quot;&gt;celery&lt;/a&gt; since it is to complex and offers way more than I was search for.
&lt;a href=&quot;https://python-rq.org/&quot;&gt;rq&lt;/a&gt; was an option but the mighty internet told me that it has its &lt;a href=&quot;https://github.com/rq/rq/issues&quot;&gt;issues&lt;/a&gt; and is kind of outdated.
&lt;a href=&quot;https://taskiq-python.github.io/&quot;&gt;taskq&lt;/a&gt; was almost the choice but tends to be a tool I would use but not for the area it was invented for.
&lt;a href=&quot;https://dramatiq.io/&quot;&gt;dramatiq&lt;/a&gt; was the choice. It was looking simple and claims to be written for python 3 from a maintainer of celery and focused on delivering 20 percent of the code base to fit in 80 percent of the celery use cases.
Not feature complete but I must admit that I did not spend time to have a look on &lt;a href=&quot;https://huey.readthedocs.io/en/latest/&quot;&gt;huey&lt;/a&gt; or &lt;a href=&quot;https://arq-docs.helpmanual.io/&quot;&gt;arq&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Adding the first actor was super satisfying since I solved my scaling problem so hard that I need to reduce the number of workers to not break one of the other systems my code works with.
Adding a second actor was also working fine since it was defined in the same context workers file.&lt;/p&gt;

&lt;p&gt;As I&#039;ve written down earlier, my code lives in one application but I have strong bounded contexts. The &quot;fun&quot; had started when I&#039;ve written a third actor but this time in a second workers file. Still until today, I am not able to separate the actors into dedicated files and still run the dramatiq workers process while it is processing all queued messages.&lt;/p&gt;

&lt;p&gt;I&#039;ve tried a lot of example projects out there. Each example project just defines one actor, almost always the one actor mentioned in the documentation which was boring.
I&#039;ve &lt;a href=&quot;https://github.com/martimors/fastapi-dramatiq-redis/pull/2&quot;&gt;updated&lt;/a&gt; dependencies to make an example still &quot;workable&quot; today. I &lt;a href=&quot;https://github.com/h3nnn4n/dramatiq_example/pull/1&quot;&gt;found&lt;/a&gt; an issue that periodiq is not supporting python 3.12. And I&#039;ve asked the maintainer of one example project if he &lt;a href=&quot;https://github.com/briantsaunders/fastapi-rabbitmq-dramatiq-demo/issues/1&quot;&gt;has an idea why multiple actors are not working&lt;/a&gt; as expected.&lt;/p&gt;

&lt;p&gt;At the end, I&#039;ve created my own &lt;a href=&quot;https://github.com/stevleibelt/typer-dramatiq-example/tree/main&quot;&gt;dramatiq example project&lt;/a&gt;. But this is an example project with multiple actors.
Furthermore, this project shows the issues since it has multiple branches. Each branch shows a way to use dramatiq and lists the downside of this approach.
I&#039;ve used this example project to ask my question in the official &lt;a href=&quot;https://groups.io/g/dramatiq-users/&quot;&gt;dramatiq group&lt;/a&gt;. Let&#039;s see if there will be an answer on it.&lt;/p&gt;

&lt;p&gt;I still hope that there is either an understanding issue on my side (like I use the tool simply wrong) or that I make a mistake in the setup and worker process creation.&lt;/p&gt;

&lt;p&gt;Your takeaway is, that there is now at least one dramatiq example with multiple actors.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Thu, 26 Sep 2024 22:41:00 +0200</pubDate>
    <guid isPermaLink="false">https://artodeto.bazzline.net/archives/22476-guid.html</guid>
    <category>cli</category>
<category>daramtiq</category>
<category>english</category>
<category>message_queue</category>
<category>python</category>
<category>typer</category>
<category>valkey</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>

</channel>
</rss>
